<!-- 首页 -->
<template>
	<view class="container">
		<view class="c-cell">
			<view class="cell-list">
				<view class="cell-item" v-for="item in activeList" :key="item.id" @click="navigateTo('./activeDetail?id='+item.id)">
					<view class="cell-item-img">
						<image :src="baseURL+item.img" mode=""></image>
					</view>
					<view class="cell-item-content">
						<text style="font-size: 32rpx;font-weight: bold;">{{item.title}}</text>
						<text>{{item.desc}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"",
		data() {
			return {
				// 活动列表
				activeList:[]
			}
		},
		onLoad() {
			this.getRecommendActiveList()
		},
		methods: {
			getRecommendActiveList(){
				this.$http.getRecommendActiveList().then(res=>{
					this.activeList = res.data
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container{
		.c-cell{
			.cell-list{
				width: 100%;
				.cell-item{
					width: 100%;
					background-color: #fff;
					border-radius: 10rpx;
					box-shadow: 0 0 10rpx 0 rgba(0, 0, 0, 0.1);
					display: flex;
					align-items: center;
					margin-bottom: 20rpx;
					.cell-item-img{
						width: 150rpx;
						height: 150rpx;
						&>image{
							width: 100%;
							height: 100%;
						}
					}
					.cell-item-content{
						width: calc(100% - 150rpx);
						padding: 0 20rpx;
						box-sizing: border-box;
						&>text{
							display: block;
						}
					}
				}
			}
		}
	}
</style>
